package com.zh.singletonmode.services.hungry;

public class HungrySingleton {
    //先静态、后动态
    //先属性、后方法
    //先上后下
    private static final HungrySingleton hungrySingleton = new HungrySingleton();

    //类中默认的无参构造方法是public修饰的，改成private修饰
//    public HungrySingleton() {
//    }
    private HungrySingleton(){

    }

    public static HungrySingleton getInstance(){
        return hungrySingleton;
    }
}

